package com.qqbot.core.message.support;

import com.alibaba.fastjson.JSON;
import com.qqbot.core.message.Message;
import lombok.Data;

/**
 * 短视频消息
 *
 * @author changwenpeng
 * @date 2022年5月9日
 */
@Data
public class VideoMessage implements Message {

    private String file;

    private String cover;

    public VideoMessage() {
    }

    public VideoMessage(String file) {
        this.file = file;
    }

    @Override
    public String toString() {
        return "video[" + file + "]";
    }

    @Override
    public String toMessageString() {
        return String.format("{\"type\":\"%s\",\"data\":%s}", "video", JSON.toJSONString(this));
    }

}
